package jin.si.com.web;

import jin.si.com.entity.User;
import jin.si.com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @description: 三层架构
 * @ClassName TestSSM
 * @Author MT
 * @Date 2021/5/13 15:12
 **/

@Controller
@RequestMapping("/ssm")
public class TestSSM {
    @Autowired
    private UserService service;

    @RequestMapping("/getUser")
    @ResponseBody
    public List<User> getUser(){
        List<User> user = service.getUser();
        System.out.println(user+"*****************************************");
        return user;

    }



}
